#ifndef GlobalsH
#define GlobalsH

  #include <vcl.h>

  #include <dir.h>
  #include <conio.h>
  #include <string.h>
  #include <stdio.h>
  #include <stdlib.h>

  #ifndef QUAD
    typedef unsigned long QUAD;
  #endif

  #ifndef WORD
    typedef unsigned short WORD;
  #endif

  #ifndef BYTE
    typedef unsigned char BYTE;
  #endif

  // 1 = go left, 0 = go right { check game to see which it uses }
  typedef struct NODE{
     BYTE code;
     QUAD  count;
     BYTE lChild;  // Left Node
     BYTE rChild;  // Right Node
  } HNODE;

  extern long lx;
  extern long ly;
  extern long low1;
  extern long low2;

  extern WORD y;
  extern WORD x;
  extern WORD cur_node;
  extern WORD list_ptr;
  extern WORD init_y;
  extern WORD node1;
  extern WORD node2;
  extern WORD snode;
  extern WORD bpos;

  extern char htbl[256][32]; // Used to store the bit codes per value

  extern HNODE huf[256];
  extern HNODE temp;

  extern FILE *f1;
  extern FILE *f2;
  extern FILE *f3;
  extern FILE *mf;

  extern char fil1[260]; // input file
  extern char fil2[260]; // output file
  extern char fil3[260]; // bit mapping file
  extern char buffer[260];
  extern char ptr[256];

  extern int  c;
  extern int  t;

  extern BYTE data;

  void strchg( char *buf, char c1, char c2);
  BYTE UpperCase( char *buf );
  long FileLen ( FILE *tf );  

  #include "Merger.h"
  #include "huff.h"
  #include "percent.h"  

#endif
 